package com.hs.sfzy.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hs.sfzy.entity.SeleArt;
import com.hs.sfzy.mapper.SeleArtMapper;
import com.hs.sfzy.service.SeleArtService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName SeleArtServiceImpl
 * @Description TODO
 * @Author liuzhuo
 * @Date 2025年08月13日 15:03
 * @Version 1.0
 */
@Service
public class SeleArtServiceImpl implements SeleArtService {
    @Autowired
    private SeleArtMapper seleArtMapper;


    @Override
    public PageInfo<SeleArt> selectAll(SeleArt seleArt, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<SeleArt> list = seleArtMapper.selectAll(seleArt);
        PageInfo<SeleArt> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }

    @Override
    public SeleArt selectById(int id) {
        return seleArtMapper.selectById(id);
    }
}
